Question: Let $P(x) = (x-1)(x-2)(x-3)$. For how many polynomials $Q(x)$ does there exist a polynomial $R(x)$ of degree 3 such that $P\left(Q(x)\right) = P(x)\cdot R(x)$?
Solution: The polynomial $P(x)\cdot R(x)$ has degree 6, so $Q(x)$ must have degree 2. Therefore $Q$ is uniquely determined by the ordered triple $(Q(1), Q(2),Q(3))$.  When $x = 1$, 2, or 3, we have
\[0 = P(x)\cdot R(x) = P\left(Q(x)\right).\]It follows that $(Q(1), Q(2), Q(3))$ is one of the 27 ordered triples $(i, j, k)$, where $i$, $j$, and $k$ can be chosen from the set $\{1, 2, 3\}$.

However, the choices $(1, 1, 1)$, $(2, 2, 2)$, $(3, 3, 3)$, $(1, 2, 3)$, and $(3, 2, 1)$ lead to polynomials $Q(x)$ defined by $Q(x) = 1$, $2,$ $3,$ $x,$ and $4-x$, respectively, all of which have degree less than 2. The other $\boxed{22}$ choices for $(Q(1),Q(2),Q(3))$ yield non-collinear points, so in each case $Q(x)$ is a quadratic polynomial.